package com.yangwudi.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

//<----------------------------------该部分为练习内容，与项目无关，可直接删除----------------------------------->

@Slf4j
@Order(3)
//@Aspect
@Component
public class MyAspect3 {
    @Pointcut("execution(* com.yangwudi.service.impl.*.*(..))")
    public void pt(){}

    //前置通知
    @Before("pt()")
    public void before(){
        log.info("before ....");
    }

    //后置通知
    @After("pt()")
    public void after(){
        log.info("after ....");
    }
}
